#include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10;
int record[100];

int f(int n)
{
	if(record[n]!=-1)
	{
		return record[n];
	}
	
	
	if(n==1)
	{
		return 1;
	}
	else
	{
		record[n]=n*f(n-1);
		return n*f(n-1);
	}
}

int main()
{
	memset(record,-1,sizeof(record));
	int n;
	cin >> n;
	cout << f(n) << endl;

	return 0;
}

